package com.kzd.btgame.entity

import com.blankj.utilcode.util.GsonUtils
import com.chad.library.adapter.base.entity.MultiItemEntity
import com.module.lemlin.http.HttpResponseData
import java.io.Serializable


data class GameVip(
    val name: String,
    val `val`: String,
) : Serializable

data class GameGuess(
    val icon: String,
    val id: String,
    val name: String,
    val number: String,
    val size: String,
    val summary: String,
    val system_type: String,
)

data class GameDiscuss(
    val cai: String,
    val content: String,
    val face: String,
    val fujian: String,
    val huiyuan_img: String,
    val id: String,
    val is_video: Int,
    val jiajing: String,
    val pid: String,
    val pinglun: String,
    val pinglunlist: MutableList<DiscussChild> = mutableListOf(),
    val sign: String,
    val status: String,
    val time: String,
    val user_name: String,
    val vip_img: String,
    var zan: String,
    var is_zan: Int,
    val comment_num: Int,
    val image: String?,
    val uid: String,
) : Serializable


class DiscussGreatResponse : HttpResponseData() {
    var isGreat: Int = 0
    var position: Int = 0
}

data class DiscussChild(
    val content: String,
    val id: String,
    val time: String,
    val uid: String,
    val user_name: String,
) : Serializable

/**
 * 游戏福利数据结构
 * */
data class GameWelfare(
    val activity: MutableList<WelfareDoing> = mutableListOf(),
    val fuli: MutableList<WelfareCoupon> = mutableListOf(),
    val lb: MutableList<WelfareGift> = mutableListOf(),
    val rebate: String? = null,
    val rebate_str: String? = null,
)

class WelfareGiftGetResponse : HttpResponseData() {
    var isDraw: Int = 0
    var position: Int = 0
}

/**
 * 游戏福利-礼包
 * */
data class WelfareGift(
    val bgimg: String,
    val cardname: String,
    val cate: String,
    val content: String,
    val end_time: String,
    val gid: String,
    val gname: String,
    val id: String,
    val is_huiyuan: String,
    val meth: String,
    val num: String,
    val start_time: String,
    val tj_icon: String,
    val tuijian: String,
    var is_draw: Int,
    val type: String,
)

/**
 * 游戏福利-券
 * */
data class WelfareCoupon(
    val id: String,
    val count: Int,
    val end_str: String,
    val end_time: String,
    val game_name: String,
    val gid: String,
    val is_draw: Boolean,
    val jian: String,
    val limit: String,
    val money: String,
    val name: String,
    val num: String,
    val start_time: String,
    val status: Int,
    val statusStr: String,
)

/**
 * 游戏福利-活动
 * */
data class WelfareDoing(
    val abgame: String,
    val bofang: String,
    val class_id: String,
    val content: String,
    val description: String,
    val end_time: String,
    val id: String,
    val image: String,
    val image2: String,
    val image3: String,
    val image_small: String,
    val is_best: String,
    val keywords: String,
    val limit_rs: String,
    val limit_str: String,
    val pingfen: String,
    val show_date: String,
    val sort: String,
    val start_time: String,
    val statusStr: String,
    val time: String,
    val title: String,
    val type: String,
    val video: String,
    val videourl: String,
    val zan: String,
    val url: String,
)

/**
 * 游戏分类
 * */
data class ClassifyTab(
    val id: String,
    val name: String,
)

data class GameFeatured(
    val slide: MutableList<GameBean> = mutableListOf(),
    val game: MutableList<GameGroup> = mutableListOf(),
)

data class GameGroup(
    val id: String,
    val title: String,
    val list: MutableList<GameBean> = mutableListOf(),
)


//data class GameTravel<T>(
//    val todayList: MutableList<T> = mutableListOf(),
//    val weekList: MutableList<GameBean> = mutableListOf(),
//    val reserveList: MutableList<GameReserve> = mutableListOf(),
//): MultiItemEntity {
//    override val itemType: Int
//        get() = type
//}


data class GameTravel(
    val list: MutableList<*> = mutableListOf<Any>(),
    val title: String = "",
    val type: Int = 0,
) : MultiItemEntity {
    override val itemType: Int
        get() = type

    fun <T> getConversionList(type: Class<T>): MutableList<T> {
        if (list.isNullOrEmpty()) {
            return mutableListOf()
        }
        val list2: MutableList<T> = mutableListOf()
        for (elem in list) {
            list2.add(GsonUtils.fromJson(GsonUtils.toJson(elem), type))
        }
        return list2
    }
}

/**
 * 游戏代金券
 * */
data class GameCoupon(
    val all_money: String,
    val biaoqian: MutableList<String> = mutableListOf(),
    val count: String,
    val icon: String?,
    val id: String,
    val name: String,
    val number: String,
    val size: String,
    val summary: String,
    val system_type: String,
    val type: String,
)

/**
 * 游戏账号交易
 * */
data class GameBargain(
    val gameName: String,
    val sname: String,
    val gid: String,
    val icon: String,
    val id: String,
    val money: String,
    val name: String,
    val images: String,
    val create_time: String,
)


class ServiceRemindResponse : HttpResponseData() {
    var isRemind: Int = 0
    var position: Int = 0
}

/**
 * 游戏详情-开服
 * */
data class GameService1(
    val create_time: String = "",
    val game_id: String = "",
    val id: String = "",
    var remind_rs: Int = 0,
    val server_name: String = "动态开服",
    val time1: String = "",
    val type: Int = 0,
)


data class ServiceTime(
    val times: MutableList<String> = mutableListOf(),
    val list: MutableMap<String, MutableList<GameService>> = mutableMapOf(),
)

data class ServiceTitleResponse(
    val data: MutableList<ServiceTitle> = mutableListOf(),
) : HttpResponseData() {
    var times: MutableList<String> = mutableListOf()
}

data class ServiceTitle(
    val title: String,
    val list: MutableList<GameService> = mutableListOf(),
)

data class GameGift(
    val card_no: String,
    val content: String,
    val create_time: String,
    val end_time: String,
    val game_id: String,
    val icon: String,
    val id: String,
    val lb_id: String,
    val meth: String,
    val name: String,
    val server_id: String,
    val state: String,
    val type: String,
    val user_id: String,
)

data class GamePlayed(
    val appid: String,
    val id: String,
    val name: String,
)

data class GameSmall(
    val server_name: String,
    val small_id: String,
    val uid: String,
    val user_name: String,
)

data class GameFeedback(
    val id: String,
    val is_bt: String,
    val name: String,
    val zhekou: String,
)


data class Feedback(
    var content: String? = null,
    var qq: String? = null,
    var imgs: String? = null,
    var type: String? = null,
    var game_id: String? = null,
    var mobile_model: String? = null,
    var classify: String? = null,
    var mobile: String? = null,
    var complaint: String? = null,
    var complaint_way: String? = null,
)

data class GameLottery(
    val awards_list: MutableList<LotteryRecord> = mutableListOf(),
    val config: MutableList<LotteryConfig> = mutableListOf(),
    val config_title: String,
    val mingxi: String,
    val nums: String,
    val shuoming: String,
) : Serializable

data class LotteryConfig(
    val create_at: String,
    val id: String,
    val name: String,
    val num: String,
    val page: String?,
    val login: Int,
    val showNum: String,
    val type: String,
    val update_at: String,
    val title: String,
) : Serializable

data class LotteryRecord(
    val id: String,
    val awards_name: String,
    val user_name: String,
    val create_at: String,
) : Serializable

data class LotteryObtain(
    val chance: String,
    val create_at: String,
    val delete_at: String,
    val icon: String?,
    val id: String,
    val name: String,
    val rank: String,
    val relation_id: String,
    val send: String,
    val status: String,
    val type: String,
    val update_at: String,
) : Serializable